﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BDSim
{
    public class MissileDynamicSetViewModel : INotifyPropertyChanged
    {
        #region 字段
        private PosBLHClass _LaunchPoint = new PosBLHClass();
        private double _LaunchAzimuth=45;
        private double _ShotRange=110000;
        private double _ExpireHeight=11000;
        private double _ActivePeriod=5;
        #endregion 字段

        #region 属性
        /// <summary>
        /// 发射点位置
        /// </summary>
        public PosBLHClass LaunchPoint
        {
            get { return _LaunchPoint; }
            set { _LaunchPoint = value; NotifyPropertyChanged("LaunchPoint"); }
        }

       /// <summary>
       /// 发射方位角
       /// </summary>
        public double LaunchAzimuth
        {
            get { return _LaunchAzimuth; }
            set { _LaunchAzimuth = value; NotifyPropertyChanged("LaunchAzimuth"); }
        }

        /// <summary>
        /// 射程
        /// </summary>
        public double ShotRange
        {
            get { return _ShotRange; }
            set { _ShotRange = value; NotifyPropertyChanged("ShotRange"); }
        }
 
        /// <summary>
        /// 关机点高度
        /// </summary>
        public double ExpireHeight
        {
            get { return _ExpireHeight; }
            set { _ExpireHeight = value; NotifyPropertyChanged("ExpireHeight"); }
        }

        /// <summary>
        /// 主动段飞行时间
        /// </summary>
        public double ActivePeriod
        {
            get { return _ActivePeriod; }
            set { _ActivePeriod = value; NotifyPropertyChanged("ActivePeriod"); }
        }
        #endregion 属性
        #region //属性通知
        public event PropertyChangedEventHandler PropertyChanged;

        public void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
        #endregion
    }
}
